
<?php if($mode == "IMG"){?>
<section class="wrapper">


	<div class="col-lg-12">
		<!--work progress start-->
		<section class="panel">

			<div class="inbox-head">
				<h3>LISTING PHOTO : <?= $post['title'];?></h3>
				<a href="<?= base_url();?>secure/listing/add"><button type="button"
						class="btn btn-danger pull-right">
						<i class="icon-plus"></i>
					</button>
				</a>
			</div>
			<div class="panel-body">
			
			<div class="fieldset " id="fieldgroup_ypage_gallery">
				
									<h3 class="title">Gallery</h3>
				
				<div class="fieldset-wrapper content">
					
					
																							
<div class="col-xs-12 clearfix">
	
<form class="form-horizontal" enctype="multipart/form-data" action="<?= base_url();?>secure/listing/uploader" method="POST">
<input type="hidden"
					name="<?php echo $this->security->get_csrf_token_name(); ?>"
					value="<?php echo $this->security->get_csrf_hash();?>" />
					
					<div class="form-group fieldzone regular" id="gallery_fieldzone">
					
					<div class="form-group">
					
					<div class="col-sm-12">

										
			<div class="upload-gallery-wrap-outer" id="wrap_gallery">
				<div class="upload-gallery-wrap clearfix">
				<p>
					<div class="upload-wrap pull-left">
						<input class="upload-hidden" name="gallery[]" type="file">
					</div>
					<p>
					<div class="col-sm-5">
					
					<input class="form-control upload-title" placeholder="Title" name="gallery_title[]" maxlength="100" type="text">
</div>
											<button type="button" class="js-add-img btn btn-info"><i
						class="icon-plus "></i> </button>
						<button type="button" class="js-remove-img btn btn-danger"><i
						class="icon-minus"></i> </button>
									</div>
									</div>
									
<div class="col-sm-5">
				<input value="2" id="gallery" type="hidden">
				</div>
			</div>

	
		
					</div>
</div>
<div class="form-group">
					<div class="col-sm-7 col-sm-9">
						<input type="hidden" name="post_id" id="post_id"
							value="<?= $post_id?>">
						<button type="submit" name="upload" class="btn btn-info" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Not allowed in Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"  >Save</button>
						<?php if(!$photos){?>
						<a href="<?= base_url();?>secure/listing/video/<?= $post_id;?>"
							class="btn btn-warning">Skip</a>
						<?php }?>
						<?php if($photos){?>
						<a href="<?= base_url();?>secure/listing/video/<?= $post_id;?>"
							class="btn btn-success">Next</a>
						<?php }?>
							</div>
							</div>

</form>
</div>

		
									</div>

							</div>
				<div class="col-xs-12 clearfix">
			<hr>
			<div class="pin">
				<?php if($photos){?>
				<div class="col2">
					<div class="list">

						<?php foreach ($photos as $photos):?>
						<div class="item">

							<img class="col-lg-3"
								src="<?=base_url()?>assets/img/data/photo/<?= $photos->value;?>"
								contenteditable="false">

						</div>
						<?php endforeach;?>
						<?php }?>

					</div>
				</div>
			</div>

		</div>
			
		
	<script type="text/javascript" src="<?= base_url();?>assets/js/img.js"></script>
			
			</div>
		</section>
	</div>
</section>
<?php }?>
<?php if($mode == "VIDEO"){?>
<section class="wrapper">


	<div class="col-lg-12">
		<!--work progress start-->
		<section class="panel">

			<div class="inbox-head">
				<h3>LISTING VIDEO : <?= $post['title'];?></h3>
				<a href="<?= base_url();?>secure/listing/add"><button type="button"
						class="btn btn-danger pull-right">
						<i class="icon-plus"></i>
					</button>
				</a>
			</div>
			<div class="panel-body">
			
			<div class="module clearfix"></div>
<div>

	<div class="panel-body">
		<?php
		if($this->session->flashdata('message'))
		{
			$msg = $this->session->flashdata('message');
			echo  $this->session->flashdata('message');
		}
		?>
		<div class="col-xs-12 clearfix">

			<form class="form-horizontal" method="POST"
				action="<?= base_url();?>secure/listing/upload_video">
				<input type="hidden"
					name="<?php echo $this->security->get_csrf_token_name(); ?>"
					value="<?php echo $this->security->get_csrf_hash();?>" />

				<div class="form-group">
					<div class="col-sm-12">

						<input type="text" class="form-control" name="video" id="video">
					</div>

				</div>
				<div class="form-group">
					<div class="col-sm-7 col-sm-9">
						<input type="hidden" name="post_id" id="post_id"
							value="<?= $post_id?>">
						<button type="submit" name="upload" class="btn btn-info" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Not allowed in Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"  >Save &
							Continue</button>
						<?php if(!$videos && $post['status'] != '51'){?>
						<a href="<?= base_url();?>secure/listing/inactive"
							class="btn btn-warning">Skip</a>
						<?php }?>
						<?php if(!$videos && $post['status'] == '51'){?>
						<a href="<?= base_url();?>secure/listing/active"
							class="btn btn-warning">Skip</a>
						<?php }?>
						<?php if($videos && $post['status'] == '1'){?>
						<a href="<?= base_url();?>secure/listing/inactive"
							class="btn btn-success">Back to List</a>
						<?php }?>
						<?php if($videos && $post['status'] == '51'){?>
						<a href="<?= base_url();?>secure/listing/active"
							class="btn btn-success">Back to List</a>
						<?php }?>
					</div>

				</div>
			</form>


		</div>
		<div class="col-xs-12 clearfix">
			<hr>
			<div class="pin">
				<?php if($videos){?>
				<div class="col2">
					<div class="list">

						<?php foreach ($videos as $videos):?>
						<div class="item">
											
											 <a id="mediaVideo" href="#" data-toggle="modal"  data-target="#videoModal" data-theVideo="//www.youtube.com/embed/<?= $videos->value;?>">
					 
					 <div class="col-lg-2">
					 <img
								class="img-responcive"
								src="<?=base_url()?>assets/img/data/video.png"
								contenteditable="false">
								
								</div>
					 </a>
																				</div>
						
						
					
				
				<div class="modal fade" id="videoModal" tabindex="-1" role="dialog" aria-labelledby="videoModal" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
    <div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						Business Video
					</div>
      <div class="modal-body">
        
        <div>
          <iframe width="100%" height="350" src=""></iframe>
        </div>
      </div>
    </div>
  </div>
</div>


   
						<?php endforeach;?>
						<?php }else?>


					</div>
				</div>
			</div>

		</div>
	</div>
</div>
			
			</div>
		</section>
	</div>
</section>

<?php }?>

